﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace UCS.XNA.Utils.Animation
{
    public class FadeInAnimation : FadeAnimation
    {
        #region Constructors

        public FadeInAnimation(IFadeAnimatable animatable, float speed)
            : base(animatable, speed)
        {

        }

        #endregion

        #region Public Methods

        public override void Update(GameTime gameTime)
        {
            if (this._animatable.Transparency < 1)
                this._animatable.Transparency += this._speed;
            else
                base.RaiseAnimationFinishedEvent();
        }

        #endregion
    }
}
